<extend name="Public/base"/>

<block name="body">
    <div class="main-title">
        <h2>{$_title}</h2>
    </div>
    <notempty name="config" >
    	<form action="{:U('Global/editConfig')}" method="post" class="form-horizontal">
    		<input type="hidden" name="id" value="{$config.id}" />
    <else />
	    <form action="{:U('Global/addConfig')}" method="post" class="form-horizontal">
    </notempty>
        <div class="form-item">
            <label class="item-label">配置项名称<span class="check-tips">（名称只能为字母、数字和下划线，且不能以数字开头，请慎重更改此项）</span></label>
            <div class="controls">
                <input type="text" class="text input-large" name="name" value="{$config.name|default=''}">
            </div>
        </div>
        <div class="form-item">
            <label class="item-label">配置项标题<span class="check-tips">（名称只能为字母、数字和下划线）</span></label>
            <div class="controls">
                <input type="text" class="text input-large" name="title" value="{$config.title|default=''}">
            </div>
        </div>
        <div class="form-item">
            <label class="item-label">配置项值<span class="check-tips"></span></label>
            <div class="controls">
            	<textarea style="width:900px;height:100px;padding:5px;" class="input-large  desc-div" name="value">{$config.value|default=''}</textarea>
            </div>
        </div>
        <div class="form-item">
            <label class="item-label">配置项描述<span class="check-tips"></span></label>
            <div class="controls">
            	<textarea style="width:900px;height:200px;padding:5px;" class="input-large  desc-div" name="description">{$config.description|default=''}</textarea>
            </div>
        </div>
        
        <div class="form-item">
            <button class="btn submit-btn ajax-post" id="submit" type="submit" target-form="form-horizontal">确 定</button>
            <button class="btn btn-return" onclick="javascript:history.back(-1);return false;">返 回</button>
        </div>
    </form>
</block>
<block name="script">
<script type="text/javascript">
	//导航高亮
	highlight_subnav('{:U('Global/configList')}');
</script>
</block>
